package com.jie.dubboweb.controller;

import com.jie.dubboapi.service.IUserService;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user")
public class UserController {

    @Reference(version = "1.0") //远程调用
    private IUserService userService;

    @GetMapping("/print")
    public String print(){
        return userService.sayHello();
    }
}
